home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Development / Source / Halma 1.1.source Folder / Halma ƒ / Halma code ƒ / halma meat.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-05-21  |  2.5 KB  |  61 lines  |  [TEXT/KAHL]

  1. /**********************************************************************\
  2.  
  3. File:        halma meat.h
  4.  
  5. Purpose:    This is the header file for halma meat.c.
  6.  
  7. This program is free software; you can redistribute it and/or modify
  8. it under the terms of the GNU General Public License as published by
  9. the Free Software Foundation; either version 2 of the License, or
  10. (at your option) any later version.
  11.  
  12. This program is distributed in the hope that it will be useful,
  13. but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. GNU General Public License for more details.
  16.  
  17. You should have received a copy of the GNU General Public License
  18. along with this program in a file named "GNU General Public License".
  19. If not, write to the Free Software Foundation, 675 Mass Ave,
  20. Cambridge, MA 02139, USA.
  21.  
  22. \**********************************************************************/
  23.  
  24. #pragma once
  25.  
  26. #include "graphics.h"
  27.  
  28. extern    short            gStickyButtonRow, gStickyButtonColumn;
  29.  
  30. enum MoveTypes
  31. {
  32.     kValidJump=0,            /* good move of already-selected piece */
  33.     kValidFirstMove,        /* nothing else selected, select any piece */
  34.     kValidSingleMove,        /* move piece single space */
  35.     kValidSingleMoveNewMove,/* move piece single space after registering previous jumps
  36.                                 as separate move */
  37.     kOffBoard,                /* click off board */
  38.     kCantJumpThere,            /* from where you are, must move (2,0), (0,2), or (2,2) */
  39.     kMustJumpOverPiece,        /* tried to jump over empty square */
  40.     kCantSelectNonPiece,    /* nothing selected yet, must select piece */
  41.     kSpaceNotEmpty,            /* must jump into empty space */
  42.     kAlreadyHighlighted        /* space already highlighted */
  43. };
  44.  
  45. void DoValidJump(WindowDataHandle theData, short theRow, short theColumn);
  46. void DoValidFirstMove(WindowDataHandle theData, short theRow, short theColumn,
  47.     Boolean drawPiece);
  48. void DoValidSingleMove(WindowDataHandle theData, short theRow, short theColumn);
  49. void DoValidSingleMoveNewMove(WindowDataHandle theData, short theRow, short theColumn);
  50. void DoOffBoard(WindowDataHandle theData);
  51. void DoCantJumpThere(WindowDataHandle theData);
  52. void DoMustJumpOverPiece(WindowDataHandle theData);
  53. void DoCantSelectNonPiece(WindowDataHandle theData);
  54. void DoSpaceNotEmpty(WindowDataHandle theData, short theRow, short theColumn);
  55. void DoAlreadyHighlighted(WindowDataHandle theData, short theRow, short theColumn);
  56. enum MoveTypes GetMoveType(short theRow, short theColumn);
  57. void SaveJumpChain(void);
  58. void UndoOneJump(WindowDataHandle theData);
  59. void UndoWholeMove(WindowDataHandle theData);
  60. short BestSolution(void);
  61.